#include "dbuseditor.h"
#include "ui_dbuseditor.h"
#include <QDebug>
//#include <QtDBus/QDBusMessage>
dbusEditor::dbusEditor(QWidget *parent) :
    QWidget(parent){
	m_ui->setupUi(this);
	QDBusConnection::connectToBus(QDBusConnection::SessionBus,"conn");
	conn=new QDBusConnection("conn");
	this->getServices();
}

void dbusEditor::changeEvent(QEvent *e)
{
    switch (e->type()) {
    case QEvent::LanguageChange:
		m_ui->retranslateUi(this);
        break;
    default:
        break;
    }
}
dbusEditor::~dbusEditor()
{
	delete m_ui;
}
void dbusEditor::getServices()
{
	QDBusMessage msg=QDBusMessage::createMethodCall("ord.freedesktop.DBus","/","","ListNames");
	msg=conn->call(msg);
	qDebug()<<msg.arguments();


}
